<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .wrap{
      width: 400px;
      height: 400px;
      background-color: antiquewhite;
      /* display: grid;
      justify-content: center;
      align-items: center; */

      /* display: table-cell;
      vertical-align: middle;
      text-align: center; */
      position: relative;
    }
    .box{
      width: 100px;
      height: 50px;
      background: #000;
      position: absolute;
      left: 50%;
      top: 50%;
      margin: -25px 0 0 -50px;
    }
  </style>
</head>
<body>
  <div class="wrap">
    <div class="box">hello</div>
  </div>
</body>
</html>